{% extends "base.html" %}
{% block title %}Daily View{% endblock %}
{% block main_content %}
    <h3>Daily View</h3>
    <h4>
        <a href="{% url swingtime-daily-view prev_day.year prev_day.month prev_day.day %}">&larr;</a>
        {{ day|date:"l, N jS Y" }}
        <a href="{% url swingtime-daily-view next_day.year next_day.month next_day.day %}">&rarr;</a>
    </h4>
    <table class="calendar">
        <thead>
            <tr>
                <th>Time</th>
                <th>Main Room</th>
                <th>Private 2</th>
                <th>Private 3</th>
                <th colspan="4">Private 4</th>
            </tr>
        </thead>
        <tbody>
            {% for tm,cells in timeslots %}
            <tr>
                <th><a href="{% url swingtime-add-event %}?dtstart={{ tm.isoformat }}">{{ tm|date:"P" }}</a></th>
                {% for cell in cells %}
                <td{% if cell.event_class %} class="{{cell.event_class}}"{% endif %}>{{ cell }}</td>    
                {% endfor %}
            </tr>
            {% endfor %}
        </tbody>
    </table>
{% endblock %}